﻿using Adalbertus.BudgetPlanner.Domain;
using FluentNHibernate.Mapping;

namespace Adalbertus.BudgetPlanner.Infrastructure.Mapping
{
    public class ExternalSourceMap : ClassMap<ExternalSource>
    {
        public ExternalSourceMap()
        {
            Id(x => x.Id);
            Map(x => x.Name).Unique().Not.Nullable();
            Map(x => x.SourceType);

            HasMany(x => x.Items);
        }
    }
}
